{{#view view.Dialog
	id=dialogId
	class="business-config-threshold-dialog hide"
	title="配置阈值"
	autoOpen=false
	modal=true
	width=550
	height=530
	buttons=dialogButtons}}
	<form class="form-horizontal">
		<div {{bind-attr class=":alert thresholdsFormTip::hide"}}><strong>{{thresholdsFormTip}}</strong></div>
		<div class="onerow4col1">
			<div class="control-group mt20">
				<label class="control-label">应用对象</label>
				<div class="controls">
				{{#if targetResource}}
					{{input class="input u-input-blue input-appObj" value=targetResource.targetName disabled=true}}
				{{else}}
					{{view view.parentView.select 
						class="service-select-width form-top-select select-textEllipsis"
						content=resources
						selectValue=thresholdForm.targetId
						optionLabelPath="name"
						optionValuePath="id"
					}}
				{{/if}}
				</div>
			</div>
			<div class="control-group">
				<label class="control-label">阈值类型</label>
				<div class="controls">
					{{view view.parentView.select 
						class="service-select-width form-top-select select-textEllipsis"
						content=thresholdTypes
						currentValue=thresholdTypeName
						selectValue=thresholdForm.thresholdType
						optionLabelPath="name"
						optionValuePath="code"
					}}
				</div>
			</div>
		</div>
		<fieldset style="position:relative;padding:20px 0">
			{{#if algorithm}}
				<!-- <div class="alarm-time-slot clearfix">
					<label class="pull-left">告警时间</label>
					<input class="pull-left" value={{alarmTime}} disabled="disabled" />
				</div> -->
			{{/if}}
			{{#unless algorithm}}
				<ul class="nav nav-tabs threshold-label-nav-tabs threshold-label-tabs clearfix">
					{{#if isShowSystemAndBusiness}}
						<li class="active">系统阈值参数</li>
						<li >交易量阈值参数</li>
						{{else}}
							{{#if isShowSystem}}
								<li class="active">系统阈值参数</li>
							{{else}}
								<li >交易量阈值参数</li>
							{{/if}}
					{{/if}}
				</ul>
				{{#if thresholdSwitch}}
					<table class="table">
						<tr>
							<th class="col-1"></th>
							<th class="col-2">严重阈值</th>
							<th class="col-3">警告阈值</th>
							<th class="col-4">提醒阈值</th>
							<th class="col-5">持续时间</th>
						</tr>
						{{#each tradingForm.thresholdParam as |tsparam|}}
						<tr>
							<td class="col-1">{{tsparam.indicatorName}}{{tsparam.operatorName}}</td>
							<td class="col-2">{{input class="input paramValue" value=tsparam.level_50}}{{tsparam.unit}}</td>
							<td class="col-3">{{input class="input paramValue" value=tsparam.level_20}}{{tsparam.unit}}</td>
							<td class="col-4">{{input class="input paramValue" value=tsparam.level_10}}{{tsparam.unit}}</td>
							<td class="col-5">{{input class="input paramValue" value=tsparam.times}}分钟</td>
						</tr>
						{{/each}}
					</table>
				{{else}}
					<table class="table">
						<tr>
							<th class="col-1"></th>
							<th class="col-2">严重阈值</th>
							<th class="col-3">警告阈值</th>
							<th class="col-4">提醒阈值</th>
							<th class="col-5">持续时间</th>
						</tr>
						{{#each thresholdForm.thresholdParam as |tsparam|}}
						<tr>
							<td class="col-1">{{tsparam.indicatorName}}{{tsparam.operatorName}}</td>
							<td class="col-2">{{input class="input paramValue" value=tsparam.level_50}}{{tsparam.unit}}</td>
							<td class="col-3">{{input class="input paramValue" value=tsparam.level_20}}{{tsparam.unit}}</td>
							<td class="col-4">{{input class="input paramValue" value=tsparam.level_10}}{{tsparam.unit}}</td>
							<td class="col-5">{{input class="input paramValue" value=tsparam.times}}分钟</td>
						</tr>
						{{/each}}
					</table>
				{{/if}}
			{{/unless}}
		</fieldset>
	</form>
{{/view}}